package com.lechicanh.cgrid.ke.api.util;

import junit.framework.TestCase;

public class UtilTestCase extends TestCase {
	public void testGetParameter(){
		assertEquals("1", Util.getParameter(new String[]{"-a", "1", "-b", "xyz"}, "a"));
		assertEquals("xyz", Util.getParameter(new String[]{"-a", "1", "-b", "xyz"}, "b"));
		assertEquals(null, Util.getParameter(new String[]{"-a", "1", "-b", "xyz"}, "xyz"));
		assertEquals(null, Util.getParameter(new String[]{"-a"}, "xyz"));
	}
}
